//
//  ActivityNewViewController.h
//  TimeTracker
//
//  Created by Michael Flakus on 2/24/13.
//  Copyright (c) 2013 Michael Flakus. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <sqlite3.h>

@interface ActivityNewViewController : UIViewController <UIPickerViewDelegate> {
	
	UITextField *activityNameTextField;
    UITextField *categoryTextField;
    UIPickerView *categoryPicker;
	
    NSString *activityName;
    NSString *categoryName;
    NSString *selectedCategoryID;
}


// UI Widgets
@property (nonatomic, retain) IBOutlet UITextField *activityNameTextField;
@property (nonatomic, retain) IBOutlet UITextField *categoryTextField;
@property (nonatomic, retain) IBOutlet UIPickerView *categoryPickerView;

// Error Message Alerts
@property (nonatomic, retain) IBOutlet UIAlertView *missingActivityNameError;
@property (nonatomic, retain) IBOutlet UIAlertView *missingCategoryError;

// input fields
@property (nonatomic, retain) NSString *activityName;
@property (nonatomic, retain) NSString *categoryName;
@property (nonatomic, retain) NSString *selectedCategoryID;


// database variables
@property (nonatomic) sqlite3 *database;
@property (strong, nonatomic) NSString *databasePath;
@property (nonatomic, strong) NSMutableArray *categoryIds;
@property (nonatomic, strong) NSMutableArray *categoryNames;


- (IBAction)cancel;
- (IBAction)save;

@end

